Changes between Initial Version and Version 1 of XmlRpcCheckSubHash


Ignore:
Timestamp:
Sep 28, 2008, 1:36:21 PM (16 years ago)
Author:
guest
Comment:

Created this page [Majky]

Legend:

Unmodified
Added
Removed
Modified
  • XmlRpcCheckSubHash

    v1 v1  
     1
     2[[PageOutline(3-4, Sections)]]
     3
     4== !CheckSubHash ==
     5
     6=== Intro ===
     7
     8  check if given subtitle files are already stored in the database
     9
     10
     11----
     12=== Description ===
     13
     14  '''struct !CheckSubHash(string $token, array($subhash, $subhash, ...) $hashes)'''
     15 
     16  This function returns subtitle file IDs for given subtitle file hashes.
     17 
     18  This can be used to quickly check (for a large list of subtitle files) which subtitle files are already stored in the database (e.g. before uploading).
     19
     20
     21----
     22=== Parameters ===
     23
     24  ''token (required)''::
     25    token string identifying user's session, taken from [wiki:XmlRpcLogIn LogIn] output structure.
     26  ''hashes (required)''::
     27    array of subtitle file hashes (MD5 hashes of subtitle file contents)
     28 
     29
     30----
     31=== Return Values ===
     32
     33  Output is returned in this structure:
     34{{{
     35  struct(
     36    (string) [status],
     37    struct(
     38      (string) [<subtitle file hash>],
     39      (string) [<subtitle file hash>],
     40    ) [data],
     41    (double) [seconds]
     42  )
     43}}}
     44
     45  and contains these elements:
     46    ''status''::
     47      function result code, see [wiki:XmlRpcStatusCode list of status codes]
     48    ''data''::
     49      contains key/value pairs where key is the subtitle file hash and value is subtitle file ID (if found)
     50    ''seconds''::
     51      time taken to execute this command on server
     52
     53
     54----
     55=== Implementations ===
     56
     57  There are currently no available sample implementations.
     58
     59
     60----
     61=== Changelog ===
     62
     63  Version 1: created this function
     64
     65
     66----
     67=== Examples ===
     68
     69
     70==== Input ====
     71 
     72{{{
     73#!xml
     74<methodCall>
     75 <methodName>CheckSubHash</methodName>
     76 <params>
     77  <param>
     78   <value><string>gqb4qjfkc66vb0sarm8j60o3t7</string></value>
     79  </param>
     80  <param>
     81   <value>
     82    <array>
     83     <data>
     84      <value><string>b76fb8e344e771de7df3f735c2f216bc</string></value>
     85      <value><string>84b3ecc07aa36820449c287e2f1d345d</string></value>
     86     
     87      ... more subtitle file hashes go here (if any) ...
     88     
     89     </data>
     90    </array>
     91   </value>
     92  </param>
     93 </params>
     94</methodCall>
     95}}}
     96
     97 
     98==== Output ====
     99
     100{{{
     101#!xml
     102<methodResponse>
     103 <params>
     104  <param>
     105   <value>
     106    <struct>
     107     <member>
     108      <name>status</name>
     109      <value><string>200 OK</string></value>
     110     </member>
     111     <member>
     112      <name>data</name>
     113      <value>
     114       <struct>
     115        <member>
     116         <name>b76fb8e344e771de7df3f735c2f216bc</name>
     117         <value><string>1951678165</string></value>
     118        </member>
     119        <member>
     120         <name>84b3ecc07aa36820449c287e2f1d345d</name>
     121         <value><string>1951915776</string></value>
     122        </member>
     123       
     124        ... more subtitle file hashes go here (if any) ...
     125       
     126       </struct>
     127      </value>
     128     </member>
     129     <member>
     130      <name>seconds</name>
     131      <value><double>0.207</double></value>
     132     </member>
     133    </struct>
     134   </value>
     135  </param>
     136 </params>
     137</methodResponse>
     138}}}
     139
     140
     141----
     142=== Notes ===
     143
     144  none yet
     145
     146
     147----
     148=== See also ===
     149
     150  * [wiki:XmlRpcCheckMovieHash CheckMovieHash]
     151
     152
     153----
     154=== Comments ===
     155
     156        add your comments, hints and suggestions here if you like ...
     157
     158
     159--------
     160[wiki:XmlRpcCheckMovieHash Prev (CheckMovieHash)] [wiki:XmlRpcIntro Home] [Next]